let state = {
		deviceInfo:{} //设备信息
	},
	getters = {},
	mutations = {
		//获取 保存设备信息
		getDeviceInfo(state){
			let info = uni.getSystemInfoSync()
			let deviceInfo = uni.getStorageSync("deviceInfo") || {}
			if(!deviceInfo.system || !deviceInfo.ratio){
				let brand = info.model
				let os = info.osName
				let brower = info.system
				let width = info.screenWidth * window.devicePixelRatio
				let height = info.screenHeight * window.devicePixelRatio
				let ratio = `${parseInt(width)}*${parseInt(height)}`
				deviceInfo = {
				 brand, 
				 os,
				 ratio,
				 brower,
				 width,
				 height
				}
			}
			// uni.showModal({
			// 	title:"提示",
			// 	content:`${JSON.stringify(deviceInfo)}`
			// })
			state.deviceInfo = deviceInfo
			uni.setStorageSync("deviceInfo",deviceInfo)
		}
	},
	actions = {
		
	}
export default {
	namespaced: true,
	state,
	getters,
	mutations,
	actions
}
